package com.yan.key;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by YanZi on 2016/12/28.
 * describe：
 * modify:
 * modify date:
 */
public class FgAdapter extends FragmentPagerAdapter {

    private List<TempFg> list;
    List<String> titles;

    public FgAdapter(FragmentManager fm, List<String> titles,
                     List<TempFg> list) {
        super(fm);
        this.titles = titles;
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles.get(position);
    }
}
